package com.atguigu.atcrowdfunding.dao;

import com.atguigu.atcrowdfunding.bean.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * lcd  2020/3/22
 * Description:
 */

public interface UserDao {
    @Select("select * from t_user")
    public List<User> queryAll() ;

    @Select("select * from t_user where loginacct=#{loginacct} and userpswd=#{userpswd}")
    User query4Login(User user);

    List<User> queryPage(Map<String, Object> map);

    Integer queryCount(Map<String, Object> map);

    void insert(User user);

    @Select("select * from t_user where id=#{id}")
    User findById(Integer id);

    void update(User user);

    void delete(String id);

    void deletes(Map<String, Object> map);

    void doAssignRole(Map<String, Object> map);

    void undoAssignRole(Map<String, Object> map);

    List<Integer> findRoleIdsByUserId(Integer id);
}
